Create a new database and make it a super-database of the database
identified by {id|name}
.
Request Headers | |
---|---|
Content-type |
The MIME type of the data in the request body. Supported values:
application/xml , application/json .
|
Upon success, MarkLogic server returns status code 201 (Created).
manage-admin
role, or the
following privilege:
http://marklogic.com/xdmp/privileges/manage-admin
The new super-database inherits the configuration of the sub-database on whose behalf it was created.
For details, see
tieredstorage:database-create-super-database
and
Tiered Storage in the Administrator's Guide.
The structure of the data in the request body is as follows:
database-name
$ cat superdb-create.xml ==> <super-database xmlns="http://marklogic.com/manage"> <database-name>super-db</database-name> </super-database> $ curl --anyauth --user user:password -X POST -d @./superdb-create.xml \ -i -H "Content-type: application/xml" \ http://localhost:8002/manage/v2/databases/sub-2/super-databases ==> Create a database named super-db and make it the super-database of sub-2. MarkLogic Server responds with status code 201 (Created) and headers similar to the following: HTTP/1.1 201 Created Content-type: application/xml Cache-Control: no-cache Expires: -1 Server: MarkLogic Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5
$ cat superdb-create.json ==> { "database-name": "super-db", } $ curl --anyauth --user user:password -X POST -d @./superdb-create.json \ -i -H "Content-type: application/json" \ http://localhost:8002/manage/v2/databases/sub-2/super-databases ==> Create a database named super-db and make the super-database of sub-2. MarkLogic Server responds with status code 201 (Created) and headers similar to the following: HTTP/1.1 201 Created Content-type: application/xml Cache-Control: no-cache Expires: -1 Server: MarkLogic Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.